Fix Task Instance mark-as downstream default#67763
Conversation
46ddfd7 to
f9907be
Compare
|
I removed the default before and some users were upset. So I think we should introduce a config option for admins to decide for themselves. |
|
I was wondering if we should have a 'user settings' (UI only / localstorage) that would allow people to configure that locally. The goal would be to not have 'UI config' globally applied returned by the backend for those "UI settings" |
|
Thanks for the clarification. I can update this PR in that direction. Before I make the change, I wanted to confirm the preferred scope. Would you prefer this to be:
My understanding from the discussion is that a local UI setting may be lighter and avoids adding backend config just for this UI preference, but I am happy to follow whichever direction maintainers prefer. |
What
This PR updates the Task Instance mark-as dialog so that the
downstreamoption is no longer selected by default.Why
In the Task Instances view, marking a failed task instance as success should not automatically include downstream task instances unless the user explicitly selects that option.
Previously, the dialog defaulted to
downstream, which meant the request was sent withinclude_downstream: true. This could cause downstreamupstream_failedtask instances to be affected and resume within the same DagRun, which differs from the older Airflow 2 Task Instances view behavior.This change makes the action safer and more explicit: only the selected task instance is updated by default, while users can still choose downstream manually when they want that behavior.
How
downstreamselection fromMarkTaskInstanceAsDialogdownstreamis not selected by defaultTests
cd airflow-core/src/airflow/ui
pnpm test MarkTaskInstanceAsDialog.test.tsx
Result:
✓ src/components/MarkAs/TaskInstance/MarkTaskInstanceAsDialog.test.tsx (1 test) 123ms
✓ MarkTaskInstanceAsDialog (1)
✓ does not select downstream by default 120ms
Test Files 1 passed (1)
Tests 1 passed (1)
uv run prek run ts-compile-lint-ui --all-files
Result:
Running hooks for
airflow-core:Compile / format / lint UI...............................................Passed